<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script src="./jquery-1.9.1.js"></script>
<body>
    <input id="input" style="background-color:#2ecc71 ;border-radius: 10px;"  type="submit" value="登录">
    <script>
        $("#input").click(function(){
           setTimeout(()=>{
            $(this).submit(()=>true);
        
           }
        ,2000);
        $(this).val("登录中...")
          $(this).attr("disabled",true);
          $(this).css("background","#9b59b6")
            $(this).submit(()=>false);
       
        })
    </script>
</body>
</html>